#pragma  once
#include "windows.h"
#include "d3d9.h"
#include "d3dx9.h"
#include "Sprite.h"
namespace Framework
{
	class CSprite;
	class Animation
	{
	private:
		int m_iFrameWidth;
		int m_iFrameHeight;
		int m_iNumWidth;
		int m_iNumHeight;
		int m_iIndex;
		float m_fTimePerImage;//time per image
		float m_fWait;//wait for next image
		RECT m_Rect;
	public:
		Animation(){}
		Animation(int NumWidth,int NumHeight,float timePerImage,CSprite *s);
		~Animation(){}
		void Update(int FirstIndex,int LastIndex,float TPF);
		RECT GetRect(){return m_Rect;}
	};
}
